#edit-mode: -*- python -*-
#coding:gbk

ImportConfigsFrom('../')

#platform, if not write PLATFORM('xxx') in BCLOUD file, default is 'redhat4u3'
#PLATFORM('centos4u3')

#gcc version, default 'gcc'
COMPILER('gcc12')
if GLOBAL_GCC_VERSION() == 'gcc82':
    CPPFLAGS('-Wno-error=sizeof-pointer-div')
    CPPFLAGS('-Wno-error=cast-function-type')
    CPPFLAGS('-Wno-error=stringop-truncation')
    CPPFLAGS('-Wno-error=unused-parameter')
    CPPFLAGS('-Wno-cast-function-type')
    CPPFLAGS('-Wno-error=sign-compare')
CPPFLAGS('-std=c++11 -Wall -fopenmp  -msse4 -Wcast-align -Ofast -lm -lrt -pthread  -DHAVE_CXX0X -march=native -Wl,--no-as-needed -fpic -g -DFINTEGER=int')

#link flags
LDFLAGS('-lpthread -pthread -lcrypto -lrt -ldl -fopenmp -lz')

#-I path
INCPATHS('../')

user_sources=GLOB(' ../puck/*.cpp ../puck/base/*.cpp  ../puck/gflags/*.cpp ../puck/hierarchical_cluster/*.cpp ../puck/puck/*.cpp ../puck/tinker/*.cpp ../puck/tinker/method/*.cc')

search_client=user_sources + " search_client.cpp "

insert_demo=user_sources +  ' insert_demo.cpp '

#bin
Application('search_client', Sources(search_client))
Application('insert_demo', Sources(insert_demo))

OUTPUT(GLOB('./conf/*'), '$OUT/conf/')
